import { VFC } from "react";
import style from './pie.module.less';
import ReactECharts from 'echarts-for-react';

export const Pie: VFC<{}> = (props) => {
    let option = {
        legend: {
            orient: 'vertical',
            left: 'left'
        },
        title: {
            text: '系统盘',
            left: 'center'
        },
        series: [
          {
            name: 'Access From',
            type: 'pie',
            radius: '50%',
            data: [
              { value: 1048, name: '已使用' },
              { value: 735, name: '未使用' },
            ],
            emphasis: {
              itemStyle: {
                shadowBlur: 10,
                shadowOffsetX: 0,
                shadowColor: 'rgba(0, 0, 0, 0.5)'
              }
            }
          }
        ]
      };
    return (
        <div className={style.pieContainer}>
            <ReactECharts style={{display:'flex', height: '100%', width: '100%'}} option={option} />
        </div>
    )
}